Open
Conversation
If we're OK with "passing" on experimental algorithms, we should be ok with passing on known algorithms that we know the name of but don't implement.
The issuer fingerprint effectively supercedes issuer keyID as a more robust signal of the issuer (though it's possible and in some cases likely to include both in a signature, to ensure that it's understood by old and new code).
Some malformed MPIs will cause a failure in packet parsing; this is an OpenPGP formatting error, so we should raise it explicitly. Below is an example packet (found on the SKS keyserver network) that has a malformed MPI. -----BEGIN PGP PUBLIC KEY BLOCK----- mQGiBEhFwD0RBAC8mLriGM4hMjV4ePeBD+FoqB/ENCXbLgl1vAvB3ha/HxqVeH1o w8HdYiSHykreflEqH31fxJv1xFgQ87sf21jv/8TeR0LeXnx7eEIF+uhDHWiZIr4q +EfrzIkpC9+yyo5XaveqNqiSOcnBH2aq334L80/2LR++7J2ffZHgWVfKDtsofE6L XfmOPAwT7R06+po2VnFjlwsD/jXgG6rkjwJZn/VhibcifIms66Fp/RYCXZp9mCeS pADN7i+7VwwCjaME3ndQu/KMdMqSzfHsWJFJbycjN5MK49vxXZyz+cGblcKmZH3V CKwC2iVVRP5FJe+ZLaqmEt/qbyjstXimWUYaJkQkD3lPz+7NfVhIXa0tlE2UcL+7 A5ghA/9+GZu0eFtV7OokUuyPHcfQDQWLh+nuJP7bVSepo9Gy4c0SCYyKlHf+e+A3 qIF76+1Gj7IvVEY8fcC0APzGad9Y0WELSTNcZ4+UqW3Ezag1k7Yq5F0VycZ2LTIC 9nF3UsjKgUxWehbkrNz9NRx9v7ktxS0f2N43dEQIffab3rPqMw== =V948 -----END PGP PUBLIC KEY BLOCK----- Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> fix up mpi error Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Each malformed packet skipped will generate a warning with the python logging module, but the stream will continue to return any subsequent well-formed packets as it is encountered. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This series of changes does significantly more error checking, and tries to avoid arbitrary exceptions being thrown when handling malformed data.
It also permits the user to use the system
loggingmodule when parsing a stream of packets to log malformed packets rather than raising an exception during the generation.Part of this cleanup also involves identifying new algorithms and packet types.